<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /**
         *  - 减： 算数运算，所以会将运算符两侧的值都 Number 一下
         * 
         * 
         */

        console.log(10 - 2);
        console.log('12' - '2', typeof ('12'-'2')); // 10  "number"
        // Number('12') - Number('2') = 10

        console.log('12' - true); // 11 Number('12') - Number(true) ==> 12 - 1 = 11

        console.log('12abc' - 20); // Number('12abc') - 20 ==> NaN - 20 ==> NaN

        console.log(null - undefined); // NaN  Number(null) - Number(undefined) ==> 0 - NaN ==> NaN
        console.log(null - true);      //  -1  Number(null) - Number(true) = 0 - 1 ==> -1

        console.log('undefined' - 20); // NaN Number('undefined') - 20 ==> NaN - 20 ==> NaN
    </script>
</body>
</html>